Set environment variable for rustdoc in custom_build.rs
authorPanashe M. Fundira <fundirap@gmail.com>
Wed, 6 Jul 2016 16:27:23 +0000 (12:27 -0400)
committerPanashe M. Fundira <fundirap@gmail.com>
Wed, 6 Jul 2016 16:27:23 +0000 (12:27 -0400)
src/cargo/ops/cargo_rustc/custom_build.rs

index c3b55e868471281de1ae7c5096f012562885c34a..c20eeca12e163abde543cb4d1542cc81c3ad5e59 100644 (file)
@@ -113,7 +113,8 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>)
      .env("OPT_LEVEL", &profile.opt_level.to_string())
      .env("PROFILE", if cx.build_config.release {"release"} else {"debug"})
      .env("HOST", &cx.config.rustc_info().host)
-     .env("RUSTC", &cx.config.rustc());
+     .env("RUSTC", &cx.config.rustc())
+     .env("RUSTDOC", &cx.config.rustdoc());
 
      if let Some(links) = unit.pkg.manifest().links(){
         p.env("CARGO_MANIFEST_LINKS", links);